import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wanchong/generated/i18n.dart';

class Call extends StatefulWidget {
  /// non-modifiable channel name of the page

  @override
  _CallState createState() => _CallState();
}

class _CallState extends State<Call> {
  var Linestate = false;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: new PreferredSize(
        child: new Container(
          child: Container(
            color: Color(0xFF1A1B1E),
          ),
        ),
        preferredSize: new Size(MediaQuery.of(context).size.width, 5.0),
      ),
      body: Container(
        color: Color(0xFF1A1B1E),
        child: Column(
          children: <Widget>[
            Container(
              height: ScreenUtil.getInstance().setHeight(250.0),
              color: Colors.red,
            ),
            Container(
              margin: EdgeInsets.only(
                  left: ScreenUtil.getInstance().setWidth(15.0),
                  right: ScreenUtil.getInstance().setHeight(15.0),
                  top: 3.0),
              child: Row(
                children: <Widget>[
                  Container(
                    width: 24.0,
                    height: 20.0,
                    alignment: Alignment.centerLeft,
                    child: Image.asset(
                      'assets/pet/equipment_battery_icon_a@2x.png',
                      width: 24.0,
                      height: 13.0,
                      fit: BoxFit.fitWidth,
                    ),
                  ),
                  Container(
                    height: 20.0,
                    alignment: Alignment.centerLeft,
                    margin: EdgeInsets.only(left: 5.0),
                    child: Text(
                      '电量50%',
                      style: TextStyle(
                        fontSize: 12.0,
                        color: Color(0xFF4ECA75),
                      ),
                    ),
                  ),
                  Expanded(
                    child: Container(),
                  ),
                  Container(
                    width: 8.0,
                    height: 8.0,
                    decoration: BoxDecoration(
                      //border: Border.all(color: Colors.white, width: 1.0),
                      color: Color(0xFF4DC975),
                      borderRadius: BorderRadius.circular(8.0),
                    ),
                  ),
                  Container(
                    height: 20.0,
                    alignment: Alignment.centerLeft,
                    margin: EdgeInsets.only(left: 5.0),
                    child: Text(
                      '在线',
                      style:
                          TextStyle(fontSize: 12.0, color: Color(0xFFFFFFFF)),
                    ),
                  ),
                ],
              ),
            ),
            Container(
              margin: EdgeInsets.only(left: 15.0, top: 10),
              alignment: Alignment.centerLeft,
              child: Text(
                '已关联：宠物的昵称',
                style: TextStyle(
                  color: Colors.white,
                ),
              ),
            ),
            Container(
              margin:
                  EdgeInsets.only(top: ScreenUtil.getInstance().setSp(50.0)),
              child: Row(
                children: <Widget>[
                  Container(
                    width: ScreenUtil.getInstance().setSp(50.0),
                  ),
                  Container(
                    width: ScreenUtil.getInstance().setWidth(60.0),
                    height: ScreenUtil.getInstance().setHeight(60.0),
                    child: Image.asset(
                      Linestate
                          ? 'assets/livevideo/video_microphone_icon_open.png'
                          : 'assets/livevideo/video_microphone_icon_disabled.png',
                      fit: BoxFit.fitHeight,
                    ),
                  ),
                  Expanded(
                    child: Container(),
                  ),
                  Container(
                    width: ScreenUtil.getInstance().setWidth(60.0),
                    height: ScreenUtil.getInstance().setHeight(60.0),
                    child: Image.asset(
                      Linestate
                          ? 'assets/livevideo/video_record_icon_close.png'
                          : 'assets/livevideo/video_record_icon_disabled.png',
                      fit: BoxFit.fitHeight,
                    ),
                  ),
                  Expanded(
                    child: Container(),
                  ),
                  Container(
                    width: ScreenUtil.getInstance().setWidth(60.0),
                    height: ScreenUtil.getInstance().setHeight(60.0),
                    child: Image.asset(
                      Linestate
                          ? 'assets/livevideo/video_voice_icon_close.png'
                          : 'assets/livevideo/video_voice_icon_disabled.png',
                      fit: BoxFit.fitHeight,
                    ),
                  ),
                  Container(
                    width: ScreenUtil.getInstance().setSp(50.0),
                  ),
                ],
              ),
            ),
            Container(
              margin:
                  EdgeInsets.only(top: ScreenUtil.getInstance().setSp(30.0)),
              child: Row(
                children: <Widget>[
                  Expanded(
                    child: Container(),
                  ),
                  Container(
                    width: ScreenUtil.getInstance().setWidth(60.0),
                    height: ScreenUtil.getInstance().setHeight(60.0),
                    child: Image.asset(
                      Linestate
                          ? 'assets/livevideo/video_location_icon_disabled.png'
                          : 'assets/livevideo/video_location_icon_disabled.png',
                      fit: BoxFit.fitHeight,
                    ),
                  ),
                  Container(
                    width: ScreenUtil.getInstance().setSp(50.0),
                  ),
                ],
              ),
            ),
            Container(
              child: Container(
                margin:
                    EdgeInsets.only(top: ScreenUtil.getInstance().setSp(100.0)),
                child: Row(
                  children: <Widget>[
                    Expanded(
                      child: Container(),
                    ),
                    Container(
                      width: ScreenUtil.getInstance().setWidth(60.0),
                    ),
                    Expanded(
                      child: Container(),
                    ),
                    Container(
                      width: ScreenUtil.getInstance().setSp(185.0),
                      height: ScreenUtil.getInstance().setSp(60.0),
                      decoration: BoxDecoration(
                        color: Color(0xFF4DC974),
                        borderRadius: BorderRadius.circular(
                            ScreenUtil.getInstance().setSp(60.0)),
                      ),
                      child: Row(
                        children: <Widget>[
                          Expanded(
                            child: Container(),
                          ),
                          Container(
                            width: 25,
                            height: 25,
                            child: Image.asset(
                              'assets/livevideo/video_connect_icon_a.png',
                              fit: BoxFit.cover,
                            ),
                          ),
                          Container(
                            child: Text(
                              '连接设备',
                              style: TextStyle(
                                  color: Colors.white, fontSize: 17.0),
                            ),
                          ),
                          Expanded(
                            child: Container(),
                          ),
                        ],
                      ),
                    ),
                    Expanded(
                      child: Container(),
                    ),
                    Container(
                      width: ScreenUtil.getInstance().setWidth(50.0),
                      height: ScreenUtil.getInstance().setHeight(50.0),
                      child: Image.asset(
                        'assets/livevideo/video_set_icon.png',
                        fit: BoxFit.fitHeight,
                      ),
                    ),
                    Expanded(
                      child: Container(),
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
